package java1909;

import java.util.Scanner;

public class xiti2_4 {
	using namespace std;

	int main()
	{
	    int n, m, kase = 0;
	    double result;
	    while (cin >> n >> m)
	    {
	        if (n == 0 && m == 0)
	        {
	            break;
	        }
	        if (n >= m || n < 0 || m >= pow(10, 6))
	        {
	            cout << "Invalid input: Expected (0, 10^6), but n=" << n << ", m=" << m << endl;
	            return -1;
	        }
	        result = 0;
	        for (int i = n; i <= m; i++)
	        {

	            result += (double)1/i/i;

	        }

	        kase++;
	        cout << "Case " << kase << ": " << setprecision(5) << fixed << result << endl;
	    }

	    return 0;
	}